function prototypeExtend() {
    let F = function () {};
    for(let i = 0; i < arguments.length; i++) {
        for(let j in arguments[i]) {
            F.prototype[j] = arguments[i][j];
        }
    }
    return new F();
}
let penguin = prototypeExtend(
    {
        speed: 20,
        swim() { console.log('游泳速度 ' + this.speed) }
    }, {
        run(speed) {console.log('奔跑速度' + speed) }
    }, {
        jump() {console.log('跳跃动作')}
    }
);
penguin.swim();
penguin.run(10);
penguin.jump();